﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleData.ObjectModel.Design
{
	/// <summary>
	/// 
	/// </summary>
	public class SchemaRule : Rule
	{
		/// <summary>
		/// Utilizado pelo EF
		/// </summary>
		protected SchemaRule()
			: base( new RuleName( "rule" ) )
		{ }

		public SchemaRule( RuleName name, Schema schema )
			: base( name )
		{
			schema.Throws().IfNull();

			this.Schema = schema;
			this.Type = RuleKind.Schema;
		}

		/// <summary>
		/// Obtém ou define o schema que possui as regras
		/// </summary>
		public Schema Schema
		{ get; protected set; }
	}

}
